#include <QCoreApplication>

#include <QHostAddress>
#include <QChar>
#include <QDebug>
#include "TcpServer.hpp"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    //qDebug() << char('0') << char(1);

    databaseInstance()->connectDB(QString("localhost"), QString("auto-inspection"),
                                QString("root"), QString(""));

    TcpServer tcpServer;
    bool ok = tcpServer.listen(
                QHostAddress("127.0.0.1"), 5555);
    if (!ok) {
        qDebug() << "Server does not start";
        return a.exec();
    }
    qDebug() << "Server is up";
    return a.exec();
}
